package cz.data.domain.system.rpc;

import cz.data.common.annotation.DataInner;
import cz.data.domain.system.model.vo.AuthorizeClientVo;
import cz.data.domain.system.model.vo.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(contextId = "userServiceFeign", value = "system-domain-api")
public interface UserServiceFeign {

    @DataInner
    @GetMapping("/login/username/{username}")
    UserInfo loginByUsername(@PathVariable("username") String username);

    @DataInner
    @GetMapping("/login/authorize/client/{client}")
    AuthorizeClientVo loginByAuthorizeClient(@PathVariable("client") String client);

    @GetMapping("/users/{id}")
    UserInfo userinfo(@PathVariable("id") String id);
}
